
#include "IFileManager.h"


IFileManager::IFileManager(const char *inFilename)
{
	mFilename = new char[strlen(inFilename)];
	strcpy_s(mFilename,strlen(inFilename),inFilename);
}

bool IFileManager::Open()
{
	if(fopen_s(&mFile,mFilename,"r")== 0)
		return true;
	else return false;
	
}

void IFileManager::Close()
{
	if(mFile)
	{
		fclose(mFile);
	}
}

IFileManager::~IFileManager()
{
	if(mFile)
	{
		fclose(mFile);
		mFile = NULL;
	}
	if(mFilename != NULL)
	{
		delete[] mFilename;
	}

}

